#pragma once
#include "devio.hpp"
#include "drv_gpio.h"

#define FORELIM_PIN         GET_PIN(G, 4)
#define FOREZERO_PIN        GET_PIN(G, 5)
#define BACKLIM_PIN         GET_PIN(G, 6)
#define BACKZERO_PIN        GET_PIN(G, 7)

class motor_forelim: private robot_devio
{
public:
    static motor_forelim& instance();
    rt_sem_t get_sem();
private:
    motor_forelim(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static motor_forelim* p;
};

class motor_forezero: private robot_devio
{
public:
    static motor_forezero& instance();
    rt_sem_t get_sem();
private:
    motor_forezero(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static motor_forezero* p;
};

class motor_backlim: private robot_devio
{
public:
    static motor_backlim& instance();
    rt_sem_t get_sem();
private:
    motor_backlim(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static motor_backlim* p;
};

class motor_backzero: private robot_devio
{
public:
    static motor_backzero& instance();
    rt_sem_t get_sem();
private:
    motor_backzero(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static motor_backzero* p;
};